package cn.test.chap4;

/**
 * @author oldliu
 * @since 1.0
 */
public class Company {
    private String name;
    private String adress;
    Worker[] workers = new Worker[10];

    public int find() {
        int top = 0;
        for (int i = 0; i < workers.length && workers[i] != null; i++) {
            if (i == 0) {
                top = workers[i].getSalary();
                continue;
            }
            if (workers[i].getSalary() > top)
                top = workers[i].getSalary();

        }
        return top;
    }

}
